<h1>Listing units</h1>

<table>
  <tr>
    <th>Name</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @units.each do |unit| %>
  <tr>
    <td><%= unit.name %></td>
    <td><%= link_to 'Show', unit %></td>
    <td><%= link_to 'Edit', edit_unit_path(unit) %></td>
    <td><%= link_to 'Destroy', unit, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Unit', new_unit_path %>
